/**
 * Generate time : 2012-01-12 15:40:23
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEDowntimeRecord table comment : 设备停机记录
 */
public class ZMCEDowntimeRecord extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentId = " "; /* 设备卡片ID */
	private String fdProductionUnitsId = " "; /* 生产单元ID */
	private String fdBeginClock = " "; /* 开始时刻 */
	private String fdEndClock = " "; /* 结束时刻 */
	private String fdDownTime = " "; /* 停机时长(M) */
	private String fdDownCategory = " "; /* 停机类别 */
	private String fdDownReason = " "; /* 停机原因 */
	private String fdRecordPerson = " "; /* 记录员 */
	private String fdRecordClock = " "; /* 记录时间 */
	private String fdRemarks = " "; /* 备注 */

	private String fdEquipmentCode = " "; /* 设备编号 */
	private String fdEquipmentName = " "; /* 设备名称 */
	private String fdSpecifications = " "; /* 设备规格 */
	private String fdModel = " "; /* 设备型号 */
	private String fdDepartment = " "; /* 设备使用单位 */
	private String fdEngineering = " "; /* FD_ENGINEERING */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("设备卡片ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("设备编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("设备名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSpecifications");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("设备规格");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdModel");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("设备型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDepartment");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("设备使用单位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEngineering");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("FD_ENGINEERING");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdProductionUnitsId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("生产单元ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdBeginClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("开始时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEndClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("结束时刻");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDownTime");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("停机时长(M)");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDownCategory");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("停机类别");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdDownReason");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("停机原因");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRecordPerson");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("记录员");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRecordClock");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("记录时间");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEDowntimeRecord() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentId - 设备卡片ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 设备卡片ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdCode - 设备编号
	 * 
	 * @return the fdCode
	 */
	public String getFdEquipmentCode() {
		return this.fdEquipmentCode;
	}

	/**
	 * set the fdCode - 设备编号
	 */
	public void setFdEquipmentCode(String fdEquipmentCode) {
		this.fdEquipmentCode = fdEquipmentCode;
	}

	/**
	 * get the fdName - 设备名称
	 * 
	 * @return the fdName
	 */
	public String getFdEquipmentName() {
		return this.fdEquipmentName;
	}

	/**
	 * set the fdName - 设备名称
	 */
	public void setFdEquipmentName(String fdEquipmentName) {
		this.fdEquipmentName = fdEquipmentName;
	}

	/**
	 * get the fdSpecifications - 设备规格
	 * 
	 * @return the fdSpecifications
	 */
	public String getFdSpecifications() {
		return this.fdSpecifications;
	}

	/**
	 * set the fdSpecifications - 设备规格
	 */
	public void setFdSpecifications(String fdSpecifications) {
		this.fdSpecifications = fdSpecifications;
	}

	/**
	 * get the fdModel - 设备型号
	 * 
	 * @return the fdModel
	 */
	public String getFdModel() {
		return this.fdModel;
	}

	/**
	 * set the fdModel - 设备型号
	 */
	public void setFdModel(String fdModel) {
		this.fdModel = fdModel;
	}

	/**
	 * get the fdDepartment - 设备使用单位
	 * 
	 * @return the fdDepartment
	 */
	public String getFdDepartment() {
		return this.fdDepartment;
	}

	/**
	 * set the fdDepartment - 设备使用单位
	 */
	public void setFdDepartment(String fdDepartment) {
		this.fdDepartment = fdDepartment;
	}

	/**
	 * get the fdEngineering - FD_ENGINEERING
	 * 
	 * @return the fdEngineering
	 */
	public String getFdEngineering() {
		return this.fdEngineering;
	}

	/**
	 * set the fdEngineering - FD_ENGINEERING
	 */
	public void setFdEngineering(String fdEngineering) {
		this.fdEngineering = fdEngineering;
	}

	/**
	 * get the fdProductionUnitsId - 生产单元ID
	 * 
	 * @return the fdProductionUnitsId
	 */
	public String getFdProductionUnitsId() {
		return this.fdProductionUnitsId;
	}

	/**
	 * set the fdProductionUnitsId - 生产单元ID
	 */
	public void setFdProductionUnitsId(String fdProductionUnitsId) {
		this.fdProductionUnitsId = fdProductionUnitsId;
	}

	/**
	 * get the fdBeginClock - 开始时刻
	 * 
	 * @return the fdBeginClock
	 */
	public String getFdBeginClock() {
		return this.fdBeginClock;
	}

	/**
	 * set the fdBeginClock - 开始时刻
	 */
	public void setFdBeginClock(String fdBeginClock) {
		this.fdBeginClock = fdBeginClock;
	}

	/**
	 * get the fdEndClock - 结束时刻
	 * 
	 * @return the fdEndClock
	 */
	public String getFdEndClock() {
		return this.fdEndClock;
	}

	/**
	 * set the fdEndClock - 结束时刻
	 */
	public void setFdEndClock(String fdEndClock) {
		this.fdEndClock = fdEndClock;
	}

	/**
	 * get the fdDownTime - 停机时长(M)
	 * 
	 * @return the fdDownTime
	 */
	public String getFdDownTime() {
		return this.fdDownTime;
	}

	/**
	 * set the fdDownTime - 停机时长(M)
	 */
	public void setFdDownTime(String fdDownTime) {
		this.fdDownTime = fdDownTime;
	}

	/**
	 * get the fdDownCategory - 停机类别
	 * 
	 * @return the fdDownCategory
	 */
	public String getFdDownCategory() {
		return this.fdDownCategory;
	}

	/**
	 * set the fdDownCategory - 停机类别
	 */
	public void setFdDownCategory(String fdDownCategory) {
		this.fdDownCategory = fdDownCategory;
	}

	/**
	 * get the fdDownReason - 停机原因
	 * 
	 * @return the fdDownReason
	 */
	public String getFdDownReason() {
		return this.fdDownReason;
	}

	/**
	 * set the fdDownReason - 停机原因
	 */
	public void setFdDownReason(String fdDownReason) {
		this.fdDownReason = fdDownReason;
	}

	/**
	 * get the fdRecordPerson - 记录员
	 * 
	 * @return the fdRecordPerson
	 */
	public String getFdRecordPerson() {
		return this.fdRecordPerson;
	}

	/**
	 * set the fdRecordPerson - 记录员
	 */
	public void setFdRecordPerson(String fdRecordPerson) {
		this.fdRecordPerson = fdRecordPerson;
	}

	/**
	 * get the fdRecordClock - 记录时间
	 * 
	 * @return the fdRecordClock
	 */
	public String getFdRecordClock() {
		return this.fdRecordClock;
	}

	/**
	 * set the fdRecordClock - 记录时间
	 */
	public void setFdRecordClock(String fdRecordClock) {
		this.fdRecordClock = fdRecordClock;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdProductionUnitsId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdProductionUnitsId")), fdProductionUnitsId));
		setFdBeginClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdBeginClock")), fdBeginClock));
		setFdEndClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEndClock")), fdEndClock));
		setFdDownTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDownTime")), fdDownTime));
		setFdDownCategory(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDownCategory")), fdDownCategory));
		setFdDownReason(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDownReason")), fdDownReason));
		setFdRecordPerson(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRecordPerson")), fdRecordPerson));
		setFdRecordClock(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRecordClock")), fdRecordClock));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));

		setFdEquipmentCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentCode")), fdEquipmentCode));
		setFdEquipmentName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentName")), fdEquipmentName));
		setFdSpecifications(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSpecifications")), fdSpecifications));
		setFdModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModel")), fdModel));
		setFdDepartment(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDepartment")), fdDepartment));
		setFdEngineering(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEngineering")), fdEngineering));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdProductionUnitsId", StringUtils.toString(fdProductionUnitsId, eiMetadata.getMeta("fdProductionUnitsId")));
		map.put("fdBeginClock", StringUtils.toString(fdBeginClock, eiMetadata.getMeta("fdBeginClock")));
		map.put("fdEndClock", StringUtils.toString(fdEndClock, eiMetadata.getMeta("fdEndClock")));
		map.put("fdDownTime", StringUtils.toString(fdDownTime, eiMetadata.getMeta("fdDownTime")));
		map.put("fdDownCategory", StringUtils.toString(fdDownCategory, eiMetadata.getMeta("fdDownCategory")));
		map.put("fdDownReason", StringUtils.toString(fdDownReason, eiMetadata.getMeta("fdDownReason")));
		map.put("fdRecordPerson", StringUtils.toString(fdRecordPerson, eiMetadata.getMeta("fdRecordPerson")));
		map.put("fdRecordClock", StringUtils.toString(fdRecordClock, eiMetadata.getMeta("fdRecordClock")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		map.put("fdEquipmentCode", StringUtils.toString(fdEquipmentCode, eiMetadata.getMeta("fdEquipmentCode")));
		map.put("fdEquipmentName", StringUtils.toString(fdEquipmentName, eiMetadata.getMeta("fdEquipmentName")));
		map.put("fdSpecifications", StringUtils.toString(fdSpecifications, eiMetadata.getMeta("fdSpecifications")));
		map.put("fdModel", StringUtils.toString(fdModel, eiMetadata.getMeta("fdModel")));
		map.put("fdDepartment", StringUtils.toString(fdDepartment, eiMetadata.getMeta("fdDepartment")));
		map.put("fdEngineering", StringUtils.toString(fdEngineering, eiMetadata.getMeta("fdEngineering")));
		return map;

	}
}